<?xml version="1.0" encoding="utf-8" ?>
<!--Example dictionary-->
<!--This is an example of dictionary of database-like (indexed) type-->
<!--Some information about file schema can be found in schema definition file Dictionary.xsd-->
<!--
    The structure of indexed dictionary is really simple:
    First - There is list of words. Each word has an unique ID.
    Second - There is list of translations. It consists of list of pairs of word IDs.
    Third - There is optional list of relations. It consists of list of pairs of word IDs with relation type specification.
    As you can see this looks like a database with two relation table and one data table.
-->
<!--
    There are several rules that should be kept when creating dictionary files:
    * Word IDs must be unique.
    * ID of first word must be 0, of second 1, third 2, etc. (*)
    * Each translation must be unique pair of word IDs.
    * Translation's w1 attribute should refer to word with Lang="1". (*)
    * Translation's w2 attribute should refer to word with Lang="2". (*)
    * Each word should have at least one translation.
    * Each relation must be unique pair of word IDs.
    * The Lang attributes of words reffrenced by one relation should have the same value. (*)
    
    Notes:
    (*) - This rule is not 'hard-wired' in the XML Schema but should (must) be followed because import logic of dictionary engine should (can) verify this (or even need id for proper working).
    must -  means that this rule *MUST* be followed because it is planned that dictionary engine import logic will utilize it during import (so it cannot work properly if the rule is not kept).
    should - means that this rule must be followed in order to import whole dictionary properly. Dictionary engine import logic can either
        - check this rule before import and don't start import if the rule is broken
     or - verify this rule during import and fail on first error
     or - verify this rule during import and skip mallformed records
     or - don't care this rule and import all data which results to invalid content of the database and it's again up to dictionary engine houw it'll deal with such database content.
     
    Because ĐŘječnik dictioinary engine's import logic if not implemended yet (when writing this example file) I'm not finally decided which way of handling mallformed records I'll chose (surely not the last one).
    This specification should be open, so in future it can be used by another SW than just mine and thist SW can keep rules more strictly then I'll chose.
    So, KEEP THE RULES!, please.
    Đ.
-->
<!--Root element-->
<Dictionary xmlns="http://dzonny.cz/xml/Dictionary"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xsi:schemaLocation="http://dzonny.cz/xml/Dictionary http://dzonny.cz/xml/Dictionary.xsd">
    <!--Basic info about dictionary (imported from simple dictionary specification)-->
    <info xmlns="http://dzonny.cz/xml/DictionarySimple"
          Date="2007-03-29"
          English1="Czech"
          English2="Russian"
          ICO="cz-ru.ico"
          Lang1Code="cz"
          Lang2Code="ru"
          Name1="Testovací slovník"
          Name2="Тест словарь"
          NameE="Test dictionary"
          Native1="Čeština"
          Native2="Русский"
          Other1="Чешский"
          Other2="Ruština"
          Version="0.0.0"
    >
        <Primary ICO1="cz.ico" ICO2="ru.ico"/><!--Present only when dictionary should be considered primary. Contains filenames of icons of languages (flags sugested). Imported from simple dictionary specification-->
        <!--Info about dictionary author (from simple)-->
        <author
            e-mail="dzonny.dz@gmail.com"
            FirstName="Jan"
            LastName="Záruba"
            nick="Đonny"
            www="http://dzonny.cz"/>
        <!--The <original> element from simple dictionary specification can be here in order to specify author of original dictionary data (if different from XML file author)-->
        <!--Note to dictionary (from simple)-->
        <note>This is test dictionary</note>
    </info>
        
    <!--List of word follows-->
    <!--
    Each word has
    Unique ID (IDs of words must create line starting at 0 with seed 1!)
    Language specification (1 or 2 according to languages defined in <info>)
    Native text of word
    Optionally latin transliteration¨of native text
    Optionally type of word (enumeration imported from simple)
    Optionally can contain note that is primarily designed for gram¨mar notes related to word)
    -->
    <word ID="0" Lang="1" Native="číňan"/>
    <word ID="1" Lang="1" Native="Čína" Type="noun"/>
    <word ID="2" Lang="2" Native="Россия" Latin="Rossija" Type="noun"/>
    <word ID="3" Lang="2" Native="Китай" Latin="Kitaj"/>
    <word ID="4" Lang="2" Native="китаец" Latin="kitajec"/>
    <word ID="5" Lang="1" Native="Rusko" Type="noun">
        <note>-a mž</note>
    </word>

    <!--List of translations follows-->
    <!--
    Each translation reffers to word in laguage 1 (w1) and in language 2 (w2).
    Each word should have at least one translation.
    Translations must be unique.
    -->
    <tr w1="0" w2="4"/>
    <tr w1="1" w2="3"/>
    <tr w1="2" w2="5"/>

    
    <!--List of relations follows-->
    <!--
    Each relation reffers to two words in same language.
    The word reffrenced by From is called source of the relation and the word refferenced by To is called target of the relation.
    For example word key can reffer to word keyboard as see-also word or word war can reffer to World War 1 as a phrase.
    Each relation must be unique by its From and To attributes.
    -->
    <rel From="1" To="0" type="seealso"/>
    <rel From="3" To="4" type="seealso"/>
</Dictionary>

<!--And is's all. I told that this is really simple unlike simple type ;-)-->
